// A CREDIT NETWORK SIMULATION
// by Andre Manoel (andremanoel@gmail.com)

#include <iostream>
#include "Environment.h"
using namespace std;

int main() {
    const int numPmts = 17;
    double input[numPmts];

    cout << "* a credit network simulation *\n";
    cout << "\n";
    cout << "enter the parameters:\n";

    // Inputing parameters through CL; the order in which it asks for the
    // parameters is the same order their values are given on the article
    cout << "number of downstream firms: ";
    cin >> input[0];
    cout << "number of upstream firms: ";
    cin >> input[1];
    cout << "number of banks: ";
    cin >> input[2];
    cout << "max. time: ";
    cin >> input[3];
    cout << "production function phi: ";
    cin >> input[4];
    cout << "production function beta: ";
    cin >> input[5];
    cout << "labour requirement function deltaD: ";
    cin >> input[6];
    cout << "labour requirement function deltaU: ";
    cin >> input[7];
    cout << "intermed. goods requirement function gamma: ";
    cin >> input[8];
    cout << "trade credit int. rate function alpha: ";
    cin >> input[9];
    cout << "bank loan int. rate function sigma: ";
    cin >> input[10];
    cout << "bank loan int. rate function theta: ";
    cin >> input[11];
    cout << "real wage: ";
    cin >> input[12];
    cout << "number of firms to look at: ";
    cin >> input[13];
    cout << "number of banks to look at: ";
    cin >> input[14];
    cout << "probability of preferred-partner choice: ";
    cin >> input[15];
    cout << "initial net worth: ";
    cin >> input[16];
    
     // Instantiating the environment and starting up the simulation
    cout << "\n";
    Environment* ourWorld = new Environment (numPmts, input);
    ourWorld->start ();
    delete ourWorld;

    return 0;
}
